package com.hake.example.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.hake.core.exception.AppException;
import com.hake.core.exception.BusinessException;
import com.hake.core.exception.DataBaseException;
import com.hake.example.entity.User;
import com.hake.example.entity.UserContact;
import com.hake.example.web.dto.UserInfo;

public interface UserInfoService {

	/**
	 * 测试注解声明式事务是否回滚
	 * 
	 * @param user
	 * @param contact
	 * @throws AppException
	 * @throws BusinessException
	 */
	public void addUserInfo(User user, UserContact contact) throws DataBaseException, BusinessException, AppException;

	public boolean insert(UserInfo dto) throws DataBaseException, BusinessException, AppException;

	public boolean delete(UserInfo dto) throws DataBaseException, BusinessException, AppException;

	public boolean update(UserInfo dto) throws DataBaseException, BusinessException, AppException;

	public UserInfo get(Integer id) throws DataBaseException, BusinessException, AppException;

	public List<User> selectList(UserInfo dto) throws DataBaseException, BusinessException, AppException;

	public PageInfo<User> selectPage(UserInfo dto) throws DataBaseException, BusinessException, AppException;
	
	public PageInfo<User> selectPage(Map<String, Object> params) throws DataBaseException, BusinessException, AppException;

}
